(function() {
    angular.module('app').factory('attrHistoryComponentService', attrHistoryComponentService);

    attrHistoryComponentService.$inject = ['util', '$q'];

    function attrHistoryComponentService(util, $q) {
        return {
            get: _get
        }

        function _get(json) {

            var defer = $q.defer();


            util.$get({
                url: '/marketconditions/property/getCategoryPropertyIndex.htm',
                data: json
            }).then(function(resp) {

                defer.resolve(resp.value);

            }, function(err) {

                defer.reject(err);

            });

            return defer.promise;
        }

    }

})();
